@import '/variable.less';

.post-detail-container {
  min-height: 100vh;
  /* 云汉主题：淡淡的紫蓝夜空渐变，与列表页保持一致 */
  background: linear-gradient(135deg, 
    #f8fafc 0%,           /* 淡蓝白色 */
    #f1f5fb 25%,          /* 极淡蓝色 */
    #e8f0fe 50%,          /* 淡蓝色 */
    #f3f0ff 75%,          /* 淡紫色 */
    #faf7ff 100%          /* 淡紫白色 */
  );
  padding-bottom: env(safe-area-inset-bottom);
  position: relative;
}

/* 导航栏样式 */
.nav-bar {
  /* 与云汉页面保持一致的渐变背景 */
  background: linear-gradient(135deg, rgba(30, 60, 114, 0.95) 0%, rgba(42, 82, 152, 0.95) 50%, rgba(123, 67, 151, 0.95) 100%);
  backdrop-filter: blur(20rpx);
  
  .nav-back {
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    
    &:active {
      background: rgba(255, 255, 255, 0.3) !important;
      transform: scale(0.95);
    }
  }
  
  .nav-title {
    color: #ffffff;
    text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
  }
}

/* 书摘内容区域 */
.post-content-section {
  /* 半透明白色背景，让主题背景若隐若现 */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10rpx);
  border-radius: 20rpx;
  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
  border: 1rpx solid rgba(255, 255, 255, 0.8);
  
  .user-info-section {
    .user-avatar {
      border: 2rpx solid rgba(59, 130, 246, 0.2);
      box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
    }
  }
  
  .book-info-section {
    background: rgba(248, 250, 252, 0.8);
    border: 1rpx solid rgba(59, 130, 246, 0.1);
    
    .book-cover {
      box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
    }
  }
  
  .quote-content-section {
    .quote-content {
      box-shadow: 0 4rpx 16rpx rgba(59, 130, 246, 0.1);
      border-left: 4rpx solid #3b82f6;
    }
  }
  
  .thoughts-section {
    .thoughts-content {
      background: rgba(59, 130, 246, 0.05);
      border: 1rpx solid rgba(59, 130, 246, 0.1);
      box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
    }
  }
  
  .actions-section {
    border-top: 1rpx solid rgba(59, 130, 246, 0.1);
    
    .action-btn {
      transition: all 0.3s ease;
      cursor: pointer;
      
      &:active {
        transform: scale(0.95);
        opacity: 0.8;
      }
      
      &:hover {
        background: rgba(59, 130, 246, 0.05);
      }
    }
  }
}

/* 评论区域 */
.comments-section {
  /* 半透明背景，与主题保持一致 */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10rpx);
  border-radius: 20rpx;
  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
  border: 1rpx solid rgba(255, 255, 255, 0.8);
  
  .comment-item {
    background: rgba(248, 250, 252, 0.8);
    border: 1rpx solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
    
    &:hover {
      background: rgba(248, 250, 252, 1);
      box-shadow: 0 4rpx 12rpx rgba(59, 130, 246, 0.1);
    }
    
    .comment-main {
      .comment-avatar {
        border: 2rpx solid rgba(59, 130, 246, 0.2);
        box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
      }
      
      .comment-actions {
        .comment-reply-btn {
          transition: all 0.3s ease;
          padding: 8rpx 16rpx;
          border-radius: 16rpx;
          
          &:hover {
            background: rgba(59, 130, 246, 0.1);
          }
          
          &:active {
            color: #1d4ed8;
            transform: scale(0.95);
          }
        }
      }
    }
    
    .replies-list {
      .reply-item {
        background: rgba(255, 255, 255, 0.8);
        border: 1rpx solid rgba(59, 130, 246, 0.1);
        transition: all 0.3s ease;
        
        &:hover {
          background: rgba(255, 255, 255, 1);
          box-shadow: 0 2rpx 8rpx rgba(59, 130, 246, 0.1);
        }
      }
    }
  }
  
  .comments-empty {
    opacity: 0.7;
    color: #64748b;
  }
}

/* 底部输入框 */
.comment-input-section {
  /* 与主题保持一致的半透明背景 */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20rpx);
  box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.08);
  border-top: 1rpx solid rgba(59, 130, 246, 0.1);
  
  .reply-hint {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 1rpx solid rgba(59, 130, 246, 0.2);
    animation: slideIn 0.3s ease;
    
    text:last-child {
      transition: all 0.2s ease;
      
      &:active {
        color: #ef4444;
        transform: scale(1.1);
      }
    }
  }
  
  .input-container {
    .comment-input {
      background: #ffffff;
      border: 2rpx solid #e2e8f0;
      transition: all 0.3s ease;
      box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
      
      &:focus {
        border-color: #3b82f6;
        box-shadow: 0 4rpx 16rpx rgba(59, 130, 246, 0.2);
        background: #ffffff;
      }
    }
    
    .send-btn {
      transition: all 0.3s ease;
      
      &:active {
        transform: scale(0.95);
      }
      
      &:hover {
        box-shadow: 0 6rpx 16rpx rgba(59, 130, 246, 0.4);
      }
    }
  }
}

/* 动画效果 */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10rpx);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式适配 */
@media screen and (max-width: 750rpx) {
  .post-content-section,
  .comments-section {
    margin: 0;
    border-radius: 0;
  }
}

/* 深色模式支持（预留） */
@media (prefers-color-scheme: dark) {
  .post-detail-container {
    background: #1a1a1a;
    color: #ffffff;
  }
  
  .post-content-section,
  .comments-section,
  .comment-input-section {
    background: #2d2d2d;
    border-color: #404040;
  }
  
  .comment-item {
    background: #333333;
  }
  
  .reply-item {
    background: #2d2d2d;
  }
}
